<h1>New User</h1>
<?php
$forward = $mvc->getObject('forward');
if (isset($forward)){
?>
	<span class="message warning">Successfully Saved.</span>
<?php } ?>
<?php	$errors = $mvc->getObject(UsersService::ERROR);
		if (isset($errors)){?>
			<div class="error">
				<ul>
<?php			foreach ($errors as $key => $value){
					echo '<li>' . $value . '</li>'; }?>
				</ul>
			</div>
<?php 	} ?>
	<form class="edit" action="new-user.html" method="post">
		<span>User Name:</span>
			<input type="text" name="username" id="username" size="35" value="<? if(isset($_POST['username'])) echo $_POST['username']; ?>"></input>
			<div class="clnr brdr">&nbsp;</div>
		<span>First Name:</span>
			<input type="text" name="firstname" id="firstname" size="35" value="<? if(isset($_POST['firstname'])) echo $_POST['firstname']; ?>"></input>
			<div class="clnr brdr">&nbsp;</div>
		<span>Last Name:</span>
			<input type="text" name="lastname" id="lastname" size="35" value="<? if(isset($_POST['lastname'])) echo $_POST['lastname']; ?>"></input>
			<div class="clnr brdr">&nbsp;</div>
		<span>Email:</span>
			<input type="text" name="email" id="email" size="35" value="<? if(isset($_POST['reg_email'])) echo $_POST['reg_email']; ?>"></input>
			<div class="clnr brdr">&nbsp;</div>
		<p class="btns">
			<a class="button" href="/new-user.html" >Discard</a>
			<input type="submit" name="submit" value="Add user" class="defBtn" />
		</p>
	</form>
	<span class="message warning">Note: After registration new user, he should get email with registration confirmation.</span>
